<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        body {
            margin: 0;
            background: #f5f5f5;
            font-family: 'Microsoft YaHei', sans-serif;
        }
        .container {
            padding: 15px;
            max-width: 800px;
            margin: 0 auto;
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .container.single-account {
            max-width: 430px;
        }
        .header {
            text-align: left;
            margin-bottom: 15px;
        }
        .container.single-account .header {
            text-align: center;
        }
        .nickname {
            font-size: 20px;
            font-weight: bold;
            color: #333;
            margin-bottom: 5px;
        }
        .qq {
            display: inline-block;
            padding: 3px 10px;
            font-size: 14px;
            color: #666;
            border: 1px solid #4a90e2;
            border-radius: 15px;
            background: #f8f9fa;
        }
        .accounts {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 15px;
        }
        .accounts.single-account {
            grid-template-columns: 1fr;
        }
        .accounts.single-account .account {
            max-width: 400px;
            margin: 0 auto;
        }
        .account {
            background: #f9f9f9;
            border-radius: 8px;
            padding: 8px;
            display: flex;
            flex-direction: column;
        }
        .account-header {
            display: flex;
            align-items: flex-start;
            margin-bottom: 5px;
        }
        .account-avatar {
            width: 32px;
            height: 32px;
            border-radius: 4px;
            margin-right: 8px;
        }
        .account-info {
            flex: 1;
            min-width: 0;
        }
        .account-username {
            font-weight: bold;
            font-size: 16px;
            color: #333;
            margin-bottom: 3px;
            display: flex;
            align-items: center;
        }
        .platform-badge {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 12px;
            margin-left: 8px;
            color: white;
            font-weight: normal;
        }
        .platform-badge.mojang {
            background-color: #e42727;
        }
        .platform-badge.littleskin {
            background-color: #90EE90;
        }
        .account-details {
            font-size: 12px;
            color: #666;
            margin-bottom: 8px;
        }
        .account-details div {
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .skin-preview {
            height: 250px;
            background: white;
            border-radius: 4px;
            overflow: hidden;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            padding: 0 10px;
        }
        .skin-preview.single-view {
            justify-content: center;
            height: 300px;
        }
        .skin-preview img {
            height: 230px;
            width: auto;
            flex: 1;
            object-fit: contain;
            max-width: calc(50% - 5px);
        }
        .skin-preview.single-view img {
            max-width: 100%;
            height: 280px;
        }
        .footer {
            text-align: center;
            color: #666;
            font-size: 14px;
            padding-top: 5px;
            border-top: 1px solid #eee;
        }
    </style>
</head>
<body>
    <div class="container {{accounts.length === 1 ? 'single-account' : ''}}">
        <div class="header">
            <div class="nickname">{{nickname}}</div>
            <div class="qq">QQ: {{qq}}</div>
        </div>
        <div class="accounts {{accounts.length === 1 ? 'single-account' : ''}}">
            {{each accounts account}}
            <div class="account">
                <div class="account-header">
                    <img class="account-avatar" src="{{account.avatarUrl}}" alt="Avatar" onerror="this.src=''">
                    <div class="account-info">
                        <div class="account-username">
                            {{account.username}}
                            <span class="platform-badge {{account.platform.toLowerCase()}}">{{account.platform}}</span>
                        </div>
                        <div class="account-details">
                            <div>UUID: {{account.uuid}}</div>
                            <div>绑定时间: {{account.bindTime}}</div>
                        </div>
                    </div>
                </div>
                <div class="skin-preview {{account.skinUrl.length === 1 ? 'single-view' : ''}}">
                    {{each account.skinUrl url}}
                    <img src="{{url}}" alt="Skin" onerror="this.src=''">
                    {{/each}}
                </div>
            </div>
            {{/each}}
        </div>
        <div class="footer">
            发送 #mc帮助 获取菜单 | mctool-plugin
        </div>
    </div>
</body>
</html> 